#include <stdio.h>

int main(int argc, char *argv[]) {

    int m = 0, n = 0;
    scanf("%d %d", &m, &n);
    int flag = 1;

    for (size_t i = m; i <= n; i++)
    {
        if(i<2){
            continue;
        }

        for (size_t z = 2; z < i; z++)
        {
            if(i%z==0){
                flag = 0;
                break;
            }
        }

        if(flag)
            printf("%d ", i);
        flag = 1;
    }
    

    return 0;
}